<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>绑定一次</title>
</head>

<body>
  <div id="root">
    <!-- 只绑定一次，后续修改数据源，此处绑定将不会发生改变 -->
    <h3 v-once>{{ msg }}</h3>
    <div>{{ msg }}</div>

  </div>

  <script src="./lib/vue.js"></script>
  <script>
    new Vue({
      el: '#root',
      data: {
        msg: '你好世界'
      }
    })
  </script>
</body>

</html>